#include <iostream>
#include <string>

using namespace std;

int & Func_1()
{
    static int val = 10;
    return val;
}

int  num;

int & Func_2()
{
    num = 80 ;
    return num ;
}

int &Func_3(int & val)
{
    return val;
}

int main(int argc, char const *argv[])
{
    int & val = Func_2();

    val = 90 ;
    
    cout << num << endl;
    
    Func_2() = 123 ;

    cout << num << endl;

    int arg =10;
    
    Func_3(arg) = 50;

    cout << arg << endl;
    
    return 0;
}
